const http = uni.$u.http

//微信登录认证
export const wxJsCode = (data, config = { custom: { type: 'url' }}) => http.post('/storepayment/applet/jsCode', data, config)
//微信解密,获取手机号,相当于注册用户
export const vxByMobile = (data, config = { custom: { type: 'url' }}) => http.post('/storepayment/applet/vxByMobile', data, config)
//问卷详情获取手机号
export const vxMobile = (data, config = { custom: { type: 'url' }}) => http.post('/storepayment/applet/vxMobile', data, config)
//登录
export const tokenByCodeForAli = (data, config = { custom: { type: 'url' }}) => http.post('/storepayment/applet/tokenByCodeForAli', data, config)
//支付宝注册用户
export const AliByMobile = (data, config = { custom: { type: 'url' }}) => http.post('/storepayment/applet/AliByMobile', data, config)
//获取验证码
export const getCode = (data, config = { custom: { type: 'url' }}) => http.post('/storepayment/applet/getVerificationCode', data, config)
export const getSmsVerifyCodeComm = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycUrl' }}) => http.post('/membership/getSmsVerifyCodeComm.jhtml', data, config)
//手机号验证码登录
export const codeLogin = (data, config = { custom: { type: 'url' }}) => http.post('/storepayment/applet/loginOrRegistered', data, config)
//绑定推荐码
export const pushMeber = (data, config = { custom: { type: 'url' }}) => http.post('/storepayment/applet/groundPushBindingMember', data, config)
//获取专属销售
export const getBindUser = (data, config = { custom: { type: 'url' }}) => http.post('/storepayment/enterpriseWx/getContactWay', data, config)

/*云采登录接口*/
//账号密码登录
export const loginServiceV3 = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycUrl' }}) => http.post('/membership/loginServiceV3', data, config)
// 检测手机号是否存在
export const existPhone = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycUrl' }}) => http.post('/membership/existPhone', data, config)
// 忘记密码-获取手机验证码
export const sendVerifyCode = (data, config = { custom: { type: 'ycUrl' }}) => http.post('/membership/sendVerifyCode', data, config)
// 忘记密码-修改密码
export const updatePwdForH5 = (data, config = { custom: { type: 'ycUrl' }}) => http.post('/membership/updatePwdForH5', data, config)
// 查询用户信息
export const loginQueryMemberInfoV3 = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycUrl' }}) => http.post('/membership/loginQueryMemberInfoV3', data, config)

//无痕验证
export const traceless = (data, config = { custom: { type: 'ycUrl' }}) => http.post('/membership/aliyunVerify/traceless', data, config)
//极光一键登录
export const mJiGuangLogin = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycUrl' }}) => http.post('/membership/mJiGuangLogin', data, config)
// 微信网页版登录通过code获取access_token
export const getWechatTokenByM = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/getWechatTokenByM', data, config)
// 根据access_token 获取微信用户信息
export const getUserinfoByPc = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/getUserinfoByPc', data, config)
// 登录信息
export const wechatLoginV3 = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/wechatLoginV3', data, config)
// 未绑定手机号
export const wechatBindVerifyByApp = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/wechatBindVerifyByApp', data, config)
// 换绑手机号
export const wechatBindByApp = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/wechatBindByApp', data, config)
